// **********************************************************************
//
// Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.2.1

package Demo;

public abstract class _PrinterDisp extends Ice.ObjectImpl implements Printer
{
    protected void
    ice_copyStateFrom(Ice.Object __obj)
        throws java.lang.CloneNotSupportedException
    {
        throw new java.lang.CloneNotSupportedException();
    }

    public static final String[] __ids =
    {
        "::Demo::Printer",
        "::Ice::Object"
    };

    public boolean
    ice_isA(String s)
    {
        return java.util.Arrays.binarySearch(__ids, s) >= 0;
    }

    public boolean
    ice_isA(String s, Ice.Current __current)
    {
        return java.util.Arrays.binarySearch(__ids, s) >= 0;
    }

    public String[]
    ice_ids()
    {
        return __ids;
    }

    public String[]
    ice_ids(Ice.Current __current)
    {
        return __ids;
    }

    public String
    ice_id()
    {
        return __ids[0];
    }

    public String
    ice_id(Ice.Current __current)
    {
        return __ids[0];
    }

    public static String
    ice_staticId()
    {
        return __ids[0];
    }

    public final int
    calcOneStep()
    {
        return calcOneStep(null);
    }

    public final BodyStruct[]
    getBodyStructList()
    {
        return getBodyStructList(null);
    }

    public final void
    initRandomMultiBodySystem()
    {
        initRandomMultiBodySystem(null);
    }

    public final void
    setDeltaT(int deltaT)
    {
        setDeltaT(deltaT, null);
    }

    public final void
    setLowerLimitMass(int lowLMass)
    {
        setLowerLimitMass(lowLMass, null);
    }

    public final void
    setLowerLimitRadii(int lowLRadii)
    {
        setLowerLimitRadii(lowLRadii, null);
    }

    public final void
    setMassCentralBody(double massCBody)
    {
        setMassCentralBody(massCBody, null);
    }

    public final void
    setNumberOfBodies(int numOfBodies)
    {
        setNumberOfBodies(numOfBodies, null);
    }

    public final void
    setSpaceCircumferenceLowerLimit(int spaceCirLowL)
    {
        setSpaceCircumferenceLowerLimit(spaceCirLowL, null);
    }

    public final void
    setSpaceCircumferenceUpperLimit(int spaceCirUppL)
    {
        setSpaceCircumferenceUpperLimit(spaceCirUppL, null);
    }

    public final void
    setUpperLimitMass(int uppLMass)
    {
        setUpperLimitMass(uppLMass, null);
    }

    public final void
    setUpperLimitRadii(int uppLRadii)
    {
        setUpperLimitRadii(uppLRadii, null);
    }

    public static IceInternal.DispatchStatus
    ___setNumberOfBodies(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int numOfBodies;
        numOfBodies = __is.readInt();
        __obj.setNumberOfBodies(numOfBodies, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setLowerLimitMass(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int lowLMass;
        lowLMass = __is.readInt();
        __obj.setLowerLimitMass(lowLMass, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setUpperLimitMass(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int uppLMass;
        uppLMass = __is.readInt();
        __obj.setUpperLimitMass(uppLMass, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setLowerLimitRadii(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int lowLRadii;
        lowLRadii = __is.readInt();
        __obj.setLowerLimitRadii(lowLRadii, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setUpperLimitRadii(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int uppLRadii;
        uppLRadii = __is.readInt();
        __obj.setUpperLimitRadii(uppLRadii, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setMassCentralBody(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        double massCBody;
        massCBody = __is.readDouble();
        __obj.setMassCentralBody(massCBody, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setSpaceCircumferenceLowerLimit(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int spaceCirLowL;
        spaceCirLowL = __is.readInt();
        __obj.setSpaceCircumferenceLowerLimit(spaceCirLowL, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setSpaceCircumferenceUpperLimit(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int spaceCirUppL;
        spaceCirUppL = __is.readInt();
        __obj.setSpaceCircumferenceUpperLimit(spaceCirUppL, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___setDeltaT(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __is = __inS.is();
        int deltaT;
        deltaT = __is.readInt();
        __obj.setDeltaT(deltaT, __current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___initRandomMultiBodySystem(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        __obj.initRandomMultiBodySystem(__current);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___calcOneStep(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __os = __inS.os();
        int __ret = __obj.calcOneStep(__current);
        __os.writeInt(__ret);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    public static IceInternal.DispatchStatus
    ___getBodyStructList(Printer __obj, IceInternal.Incoming __inS, Ice.Current __current)
    {
        __checkMode(Ice.OperationMode.Normal, __current.mode);
        IceInternal.BasicStream __os = __inS.os();
        BodyStruct[] __ret = __obj.getBodyStructList(__current);
        bodyStructListHelper.write(__os, __ret);
        return IceInternal.DispatchStatus.DispatchOK;
    }

    private final static String[] __all =
    {
        "calcOneStep",
        "getBodyStructList",
        "ice_id",
        "ice_ids",
        "ice_isA",
        "ice_ping",
        "initRandomMultiBodySystem",
        "setDeltaT",
        "setLowerLimitMass",
        "setLowerLimitRadii",
        "setMassCentralBody",
        "setNumberOfBodies",
        "setSpaceCircumferenceLowerLimit",
        "setSpaceCircumferenceUpperLimit",
        "setUpperLimitMass",
        "setUpperLimitRadii"
    };

    public IceInternal.DispatchStatus
    __dispatch(IceInternal.Incoming in, Ice.Current __current)
    {
        int pos = java.util.Arrays.binarySearch(__all, __current.operation);
        if(pos < 0)
        {
            return IceInternal.DispatchStatus.DispatchOperationNotExist;
        }

        switch(pos)
        {
            case 0:
            {
                return ___calcOneStep(this, in, __current);
            }
            case 1:
            {
                return ___getBodyStructList(this, in, __current);
            }
            case 2:
            {
                return ___ice_id(this, in, __current);
            }
            case 3:
            {
                return ___ice_ids(this, in, __current);
            }
            case 4:
            {
                return ___ice_isA(this, in, __current);
            }
            case 5:
            {
                return ___ice_ping(this, in, __current);
            }
            case 6:
            {
                return ___initRandomMultiBodySystem(this, in, __current);
            }
            case 7:
            {
                return ___setDeltaT(this, in, __current);
            }
            case 8:
            {
                return ___setLowerLimitMass(this, in, __current);
            }
            case 9:
            {
                return ___setLowerLimitRadii(this, in, __current);
            }
            case 10:
            {
                return ___setMassCentralBody(this, in, __current);
            }
            case 11:
            {
                return ___setNumberOfBodies(this, in, __current);
            }
            case 12:
            {
                return ___setSpaceCircumferenceLowerLimit(this, in, __current);
            }
            case 13:
            {
                return ___setSpaceCircumferenceUpperLimit(this, in, __current);
            }
            case 14:
            {
                return ___setUpperLimitMass(this, in, __current);
            }
            case 15:
            {
                return ___setUpperLimitRadii(this, in, __current);
            }
        }

        assert(false);
        return IceInternal.DispatchStatus.DispatchOperationNotExist;
    }

    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeTypeId(ice_staticId());
        __os.startWriteSlice();
        __os.endWriteSlice();
        super.__write(__os);
    }

    public void
    __read(IceInternal.BasicStream __is, boolean __rid)
    {
        if(__rid)
        {
            __is.readTypeId();
        }
        __is.startReadSlice();
        __is.endReadSlice();
        super.__read(__is, true);
    }

    public void
    __write(Ice.OutputStream __outS)
    {
        Ice.MarshalException ex = new Ice.MarshalException();
        ex.reason = "type Demo::Printer was not generated with stream support";
        throw ex;
    }

    public void
    __read(Ice.InputStream __inS, boolean __rid)
    {
        Ice.MarshalException ex = new Ice.MarshalException();
        ex.reason = "type Demo::Printer was not generated with stream support";
        throw ex;
    }
}
